-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPIKE] Give details parent group role and summary element button role #5355
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
owenatgov
changed the title
Give details parent group role and summary element button role
[SPIKE] Give details parent group role and summary element button role
Sep 26, 2024
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-5355
September 26, 2024 08:58
Inactive
📋 StatsFile sizes
Modules
View stats and visualisations on the review app Action run for d98ef4b |
Rendered HTML changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/details/template-default.html b/packages/govuk-frontend/dist/govuk/components/details/template-default.html
index c267b0ba1..cb561a94f 100644
--- a/packages/govuk-frontend/dist/govuk/components/details/template-default.html
+++ b/packages/govuk-frontend/dist/govuk/components/details/template-default.html
@@ -1,5 +1,5 @@
-<details class="govuk-details">
- <summary class="govuk-details__summary">
+<details role="group" class="govuk-details">
+ <summary class="govuk-details__summary" role="button">
<span class="govuk-details__summary-text">
Help with nationality
</span>
diff --git a/packages/govuk-frontend/dist/govuk/components/details/template-expanded.html b/packages/govuk-frontend/dist/govuk/components/details/template-expanded.html
index fbd18a71a..c19967910 100644
--- a/packages/govuk-frontend/dist/govuk/components/details/template-expanded.html
+++ b/packages/govuk-frontend/dist/govuk/components/details/template-expanded.html
@@ -1,5 +1,5 @@
-<details id="help-with-nationality" class="govuk-details" open>
- <summary class="govuk-details__summary">
+<details id="help-with-nationality" role="group" class="govuk-details" open>
+ <summary class="govuk-details__summary" role="button">
<span class="govuk-details__summary-text">
Help with nationality
</span>
diff --git a/packages/govuk-frontend/dist/govuk/components/details/template-with-html.html b/packages/govuk-frontend/dist/govuk/components/details/template-with-html.html
index bd5dd1fd4..22d948db4 100644
--- a/packages/govuk-frontend/dist/govuk/components/details/template-with-html.html
+++ b/packages/govuk-frontend/dist/govuk/components/details/template-with-html.html
@@ -1,5 +1,5 @@
-<details class="govuk-details">
- <summary class="govuk-details__summary">
+<details role="group" class="govuk-details">
+ <summary class="govuk-details__summary" role="button">
<span class="govuk-details__summary-text">
Where to find your National Insurance Number
</span>
Action run for d98ef4b |
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/details/fixtures.json b/packages/govuk-frontend/dist/govuk/components/details/fixtures.json
index eaac97378..66783f90e 100644
--- a/packages/govuk-frontend/dist/govuk/components/details/fixtures.json
+++ b/packages/govuk-frontend/dist/govuk/components/details/fixtures.json
@@ -11,7 +11,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": false,
- "html": "<details class=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Help with nationality\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.\n </div>\n</details>"
+ "html": "<details role=\"group\" class=\"govuk-details\">\n <summary class=\"govuk-details__summary\" role=\"button\">\n <span class=\"govuk-details__summary-text\">\n Help with nationality\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.\n </div>\n</details>"
},
{
"name": "expanded",
@@ -25,7 +25,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": true,
- "html": "<details id=\"help-with-nationality\" class=\"govuk-details\" open>\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Help with nationality\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.\n </div>\n</details>"
+ "html": "<details id=\"help-with-nationality\" role=\"group\" class=\"govuk-details\" open>\n <summary class=\"govuk-details__summary\" role=\"button\">\n <span class=\"govuk-details__summary-text\">\n Help with nationality\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.\n </div>\n</details>"
},
{
"name": "with html",
@@ -37,7 +37,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": false,
- "html": "<details class=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Where to find your National Insurance Number\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Your National Insurance number can be found on\n<ul>\n <li>your National Insurance card</li>\n <li>your payslip</li>\n <li>P60</li>\n <li>benefits information</li>\n <li>tax return</li>\n</ul>\n\n </div>\n</details>"
+ "html": "<details role=\"group\" class=\"govuk-details\">\n <summary class=\"govuk-details__summary\" role=\"button\">\n <span class=\"govuk-details__summary-text\">\n Where to find your National Insurance Number\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Your National Insurance number can be found on\n<ul>\n <li>your National Insurance card</li>\n <li>your payslip</li>\n <li>P60</li>\n <li>benefits information</li>\n <li>tax return</li>\n</ul>\n\n </div>\n</details>"
},
{
"name": "id",
@@ -50,7 +50,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": false,
- "html": "<details id=\"my-details-element\" class=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Expand this section\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Here are some more details\n </div>\n</details>"
+ "html": "<details id=\"my-details-element\" role=\"group\" class=\"govuk-details\">\n <summary class=\"govuk-details__summary\" role=\"button\">\n <span class=\"govuk-details__summary-text\">\n Expand this section\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Here are some more details\n </div>\n</details>"
},
{
"name": "html as text",
@@ -62,7 +62,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": false,
- "html": "<details class=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Expand this section\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n More about the greater than symbol (>)\n </div>\n</details>"
+ "html": "<details role=\"group\" class=\"govuk-details\">\n <summary class=\"govuk-details__summary\" role=\"button\">\n <span class=\"govuk-details__summary-text\">\n Expand this section\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n More about the greater than symbol (>)\n </div>\n</details>"
},
{
"name": "html",
@@ -74,7 +74,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": false,
- "html": "<details class=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Expand this section\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n More about <b>bold text</b>\n </div>\n</details>"
+ "html": "<details role=\"group\" class=\"govuk-details\">\n <summary class=\"govuk-details__summary\" role=\"button\">\n <span class=\"govuk-details__summary-text\">\n Expand this section\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n More about <b>bold text</b>\n </div>\n</details>"
},
{
"name": "summary html as text",
@@ -86,7 +86,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": false,
- "html": "<details class=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n The greater than symbol (>) is the best\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Here are some more details\n </div>\n</details>"
+ "html": "<details role=\"group\" class=\"govuk-details\">\n <summary class=\"govuk-details__summary\" role=\"button\">\n <span class=\"govuk-details__summary-text\">\n The greater than symbol (>) is the best\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Here are some more details\n </div>\n</details>"
},
{
"name": "summary html",
@@ -98,7 +98,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": false,
- "html": "<details class=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Use <b>bold text</b> sparingly\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Here are some more details\n </div>\n</details>"
+ "html": "<details role=\"group\" class=\"govuk-details\">\n <summary class=\"govuk-details__summary\" role=\"button\">\n <span class=\"govuk-details__summary-text\">\n Use <b>bold text</b> sparingly\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Here are some more details\n </div>\n</details>"
},
{
"name": "classes",
@@ -111,7 +111,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": false,
- "html": "<details class=\"govuk-details some-additional-class\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Expand me\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Here are some more details\n </div>\n</details>"
+ "html": "<details role=\"group\" class=\"govuk-details some-additional-class\">\n <summary class=\"govuk-details__summary\" role=\"button\">\n <span class=\"govuk-details__summary-text\">\n Expand me\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Here are some more details\n </div>\n</details>"
},
{
"name": "attributes",
@@ -127,7 +127,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": false,
- "html": "<details class=\"govuk-details\" data-some-data-attribute=\"i-love-data\" another-attribute=\"foo\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Expand me\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Here are some more details\n </div>\n</details>"
+ "html": "<details role=\"group\" class=\"govuk-details\" data-some-data-attribute=\"i-love-data\" another-attribute=\"foo\">\n <summary class=\"govuk-details__summary\" role=\"button\">\n <span class=\"govuk-details__summary-text\">\n Expand me\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Here are some more details\n </div>\n</details>"
}
]
}
Action run for d98ef4b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Offshoot of #5353 to try and isolate which part of that PR is working for dragon